﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/AdminMaster.master" AutoEventWireup="true" CodeFile="AssessorInvoiceDetail.aspx.cs" Inherits="Admin_AssessorInvoiceDetail" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
     <style type="text/css">
         .shadow {
            box-shadow: inset 0 0 25px #000000;
            border-radius: 6px;
        }
         </style>
 
    <asp:ScriptManager ID="ScriptID" runat="server"></asp:ScriptManager>
    <table style="width: 100%; margin-left: 0%;" class="shadow" id="TABLE2" cellspacing="1" cellpadding="1" border="0">
        <tbody>
            <tr>
                <td colspan="2" style="text-align: left; padding-left: 4%;">
                    <h2>&nbsp;Invoice Details</h2>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right; padding-left: 8%;">   <asp:Button ID="btnUploadInvoice"  runat="server" Text="Generate Invoice" CausesValidation="false" OnClick="btnUploadInvoice_Click"></asp:Button>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;</td>
            </tr>
             <tr>
                <td colspan="2" style="text-align: left; padding-left: 8%;">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" class="auto-style7" style="width:40%;"></td>

                <td style="width: 60%; height: 17px">
                    <asp:Label ID="lblMessage" runat="server" Font-Bold="True"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                <div class="grd_table" style="max-height: 150px;overflow-y: scroll; margin-left:3%; width:94%;" runat="server" >
                        <asp:GridView ID="gvAInvoice" runat="server" Width="100%" AutoGenerateColumns="false" AllowPaging="false"
                            DataKeyNames="InvoiceID" PageSize="6" OnRowDataBound="gvAInvoice_RowDataBound">
                            <Columns>
                                <asp:BoundField DataField="InvoiceNo" HeaderText="&nbsp;Invoice No">
                                    <ItemStyle Width="30%" HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="InvoiceDate" HeaderText="&nbsp;Invoice Date">
                                    <ItemStyle Width="30%" HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                 <asp:BoundField DataField="InvoiceAmount" HeaderText="&nbsp;InvoiceAmount">
                                    <ItemStyle Width="10%" HorizontalAlign="Right" />
                                    <HeaderStyle HorizontalAlign="Right" />
                                </asp:BoundField>
                                   <asp:TemplateField HeaderText="Download" ItemStyle-Width="10%">
                                    <ItemTemplate>
                                        <asp:HyperLink runat="server" 
                                            NavigateUrl='<%# GetInvoiceReceiptUrl(Eval("InvoiceID"))%>' 
                                            Text='Download'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                
                                 <asp:TemplateField HeaderText="Upload Invoice">
                                    <ItemStyle Width="12%" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:HyperLink ID="lnkUpload" runat="server" Text="Upload"  NavigateUrl='<%# GetInvoiceReceipt(Eval("InvoiceID"))%>'>
                                           
                                        </asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField Visible="false">
                                    <ItemStyle Width="12%" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblUpload" Text='<%# Eval("UploadStatus") %>' runat="server" >
                                            
                                           
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField Visible="false">
                                    <ItemStyle Width="12%" HorizontalAlign="Left" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblinvoice" Text='<%# Eval("InvoiceID") %>' runat="server">
                                            
                                           
                                        </asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                              <emptydatarowstyle forecolor="Red" HorizontalAlign="Center"/>
                              <emptydatatemplate>
                                 Invoices not available.
                            </emptydatatemplate>
                        </asp:GridView>
                    </div>
                </td>
            </tr>
              <tr>
                <td align="right" colspan="2" style="height: 10px; text-align: center">&nbsp;</td>
            </tr>

             <tr>
                <td align="right" colspan="2" style="height: 10px; text-align: center">&nbsp;</td>
            </tr>


            

        </tbody>
    </table>

</asp:Content>

